<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="<s:url value="/css/style.css"/>" rel="stylesheet"
			type="text/css" />
		<link href="<s:url value="/css/jquery.css"/>" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript" src="<s:url value="/js/jquery.js"/>"></script>
		<script type="text/javascript" src="<s:url value="/js/jquery-ui.js"/>"></script>
		<script type="text/javascript" src="<s:url value="/js/common.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.bgiframe.min.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.ajaxQueue.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/thickbox-compressed.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.autocomplete.js"/>"></script>
		<link rel="stylesheet" type="text/css"
			href="<s:url value="/js/autocomplete/jquery.autocomplete.css"/>" />
		<script type="text/javascript" src="<s:url value="/js/jquery-ui.js"/>"></script>
		<link rel="stylesheet" type="text/css"
			href="<s:url value="/js/autocomplete/thickbox.css"/>" />
		<script type="text/javascript"
			src="<s:url value="/js/jquery.blockUI.js"/>"></script>
		<script type="text/javascript">
       	function goBack(){
			location.href='<s:url value="/finance/PersonalPay/list"/>';
		};
		 $(function(){
		 $("#giftsTd :checkbox").each( function(i) {
		            if (i!=0&&i%2==0){
		 		       $("<br/>").insertBefore($(this));
		 		    }
		     });
			 $("#materialsTd :checkbox").each( function(i) {
			          if (i!=0&&i%2==0){
		 		        $("<br/>").insertBefore($(this));
		 		      }
		 	  });
		 });
</script>
		<s:head />
		<title><s:text name="system.title" />
		</title>
	</head>
	<body oncontextmenu="return false">
		<s:include value="/common/up.jsp"></s:include>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="box">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td id="tag-over">
								<span id="tag-over">PersonalPay</span>
							</td>
							<td class="tab3-line" width="90%">
								&nbsp;
							</td>
						</tr>
					</table>
					<s:form action="PersonalPay/pay" namespace="/finance" method="post"
						id="editForm" name="editForm">
						<s:hidden name="id"></s:hidden>
						<table width="100%" border="0" cellpadding="3" cellspacing="1"
							class="margin">
							<tr>
								<td align="right" class="tablecolour5">
									Name:
								</td>
								<td class="tablecolour5" colspan="3">
									<s:if test="selLeadsId!=null">
										<input id="selstudent" size="40" type="text"
											readonly='readonly' disabled="disabled"
											value="<s:property value="getSelLeadsInfo()"/>" />
										<s:hidden id="selstudentid" name="selLeadsId" />
									</s:if>
									<s:else>
										<input id="selstudent" size="40" type="text"
											value="<s:property value="getSelLeadsInfo()"/>" />
										<s:hidden id="selstudentid" name="selLeadsId" />
									</s:else>
									<br />
									VIP
									<s:checkbox name="isVip" cssClass="input2" disabled="true" />
								</td>
								<td align="right" class="tablecolour5">
									Card:
								</td>
								<td class="tablecolour5">
									<s:property value="card" />
								</td>
								<td align="right" class="tablecolour5">
									Elite Card:
								</td>
								<td class="tablecolour5">
									<s:property value="eliteCard" />
								</td>
							</tr>
							<tr>
								<td align="right" class="tablecolour5">
									Contract No:
								</td>
								<td class="tablecolour5">
									<s:property value="contractNo" />
								</td>
								<td align="right" class="tablecolour5">
									Price:
								</td>
								<td class="tablecolour5">
									<s:property value="price" />
									&nbsp;
									<s:property value="payMethod" />
								</td>
								<td align="right" class="tablecolour5">
									Begin:
								</td>
								<td class="tablecolour5">
									<s:date name="startTime" format="yyyy-MM-dd" />
								</td>
								<td align="right" class="tablecolour5">
									End:
								</td>
								<td class="tablecolour5">
									<s:date name="endTime" format="yyyy-MM-dd" />
								</td>
							</tr>
							<tr>
								<td align="right" class="tablecolour5">
									Course Name:
								</td>
								<td class="tablecolour5">
									<s:property value="course.name" />
									<table width="80%" border="0">
										<tr>
											<td class="tablecolour5">
												<table id="classUnitTable" align="center" width="100%"
													border="0" cellpadding="0" cellspacing="1" class="box2">
													<tr>
														<td class="tablecolour1">
															ClassType
														</td>
														<td class="tablecolour1">
															Limit
														</td>
													</tr>
													<s:iterator value="selectClassUnitList" status="status">
														<tr id="<s:property value="classType.id" />">
															<td class="tablecolour2">
																<s:property value="classType.name" />
															</td>
															<td title="limit" class="tablecolour2">
																<s:property value="updateLimitTimes" />
															</td>
														</tr>
													</s:iterator>
												</table>
											</td>
										</tr>
									</table>
								</td>
								<td align="right" class="tablecolour5">
									Free F2F:
								</td>
								<td class="tablecolour5">
									<s:property value="freeF2FTimes" />
								</td>
								<td align="right" class="tablecolour5">
									Promotion Item:
								</td>
								<td id="giftsTd" class="tablecolour5">
									<s:checkboxlist disabled="true" id="gifts" name="selgifts"
										list="allGifts" listKey="key" listValue="value"
										value="selectedGifts">
									</s:checkboxlist>
								</td>
								<td align="right" class="tablecolour5">
									Material:
								</td>
								<td id="materialsTd" class="tablecolour5">
									<s:checkboxlist disabled="true" id="materials"
										name="selmaterials" list="allMaterials" listKey="key"
										listValue="value" value="selectedMaterials">
									</s:checkboxlist>
								</td>
							</tr>
							<tr>
								<td align="right" class="tablecolour5">
									Comment:
								</td>
								<td class="tablecolour5" colspan='7'>
									<s:property value="comments" />
								</td>

							</tr>
							<tr>
							    <td align="right" class="tablecolour5">
									Paid:
								</td>
								<td class="tablecolour5">
									<s:property value="paidMoney" />
								</td>
								 <td align="right" class="tablecolour5">
									Pay History:
								</td>
								<td class="tablecolour5" colspan="5">
									<table  align="center" width="100%"
										border="0" cellpadding="0" cellspacing="1" class="box2">
										<tr>
										    <td class="tablecolour1">
												Type
											</td>
											<td class="tablecolour1">
												Pay
											</td>
											<td class="tablecolour1">
												Time
											</td>
											<td class="tablecolour1">
												Comment
											</td>
										</tr>
										<s:iterator value="payHistoryList" status="status">
											<tr>
												<td class="tablecolour2">
													<s:property value="payType" />
												</td>
												<td class="tablecolour2">
													<s:property value="pay" />
												</td>
												<td class="tablecolour2">
													<s:date name="payTime" format="yyyy-MM-dd" />
												</td>
												<td class="tablecolour2">
													<s:property value="comments" />
												</td>
											</tr>
										</s:iterator>
									</table>
								</td>
							</tr>
							<tr>
								<td align="center" colspan="8" height="50" class="tablecolour5">
									<input name="goback" type="button" class="btn1" value="Go Back"
										onclick="goBack()" />
								</td>
							</tr>
						</table>
					</s:form>
				</td>
			</tr>
		</table>
		<s:include value="/common/down.jsp"></s:include>
		<div id='pop-div' style="width: 300px;" class="pop-box">
			<s:include value="/common/confirm.jsp"></s:include>
		</div>
	</body>
</html>